package ph.com.gs3.formalistics.view.valueobjects;

import java.util.List;

import ph.com.gs3.formalistics.global.utilities.logging.FLLogger;
import ph.com.gs3.formalistics.model.valueobjects.business.document.DocumentAction;

public class UserActionListViewItem {

	// data fields
	public String documentDbId;
	public String documentWebId;
	public String formWebId;
	public String authorWebId;
	public String server;

	// view fields
	public String header;
	public String date;
	public String subheader;
	public String contentsHeader;
	public String contentsBody;

	public String footerHeader;
	public String footerBody;

	public String imageURL;

	public boolean isStarred;

	public UpdateType updateType;

	public List<DocumentAction> availableActions;

	public boolean showActionsButton;
	public boolean showStarButton;
	public boolean showCommentButton;

	public boolean isOutgoing;
	
	public static enum UpdateType {
		NEW, UPDATE, CURRRENT
	}

	public UserActionListViewItem() {
		showActionsButton = true;
		showStarButton = true;
		showCommentButton = true;
		
		isOutgoing = false;
	}

	@Override
	public String toString() {

		return "UserActionListItem: " + documentDbId + " " + header + " " + subheader;

	}

	public void setStarred(boolean isStarred) {

		FLLogger.d("UserActionListViewItem", isStarred ? "starred" : "unstarred");
		this.isStarred = isStarred;
	}

}
